package com.icss.day02;

//public final class Test12 {
public  class Test12 {

    public static void main(String[] args) {
        Student stu = new Student("tom", 10);
        // Object.toString() return getClass().getName() + "@" + Integer.toHexString(hashCode());
        // 未覆盖toString方法时，com.icss.day02.Student@1b6d3586

        // 覆盖之后： Student{name='tom', age=10}

        System.out.println(stu);
        // String.valueof(Object )
        // valueof{  return obj.toString() }

        String str = "hell";
//        final String str = "hell";
        System.out.println(str);
        str = "aaa";

        // 静态不可以调用非静态的
//        aaa();
    }
//    public final void aaa() {
    public void aaa() {
        main(null);
    }
}
class C1 extends Test12 {
    @Override
    public void aaa() {
        super.aaa();
    }
}
